package per.srp.demo.web.controller;

import org.springframework.boot.SpringApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import per.srp.demo.DemoApplication;

@RestController
public class ShutdownController {
    @GetMapping("/shutdown")
    public boolean shutdown(String pass){
        if("123456".equals(pass)){
            return DemoApplication.exitBoot();
        }
        return false;
    }
}
